/**
 * @param {number} n
 * @return {number}
 */
//动态规划
var climbStairs = function(n) {
  let p=0
  let q=0
  let s=1
  while(n){
    p = q
    q = s
    s = p+q
    n--
  }
  return s
};